Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Functions / Obtaining Information on Printing-Related Objects


GXGetFormatDimensions

You can use the GXGetFormatDimensions function to obtain the page size and paper size associated with a format object.

void GXGetFormatDimensions (gxFormat aFormat, 
                              gxRectangle *pageSize,
                              gxRectangle *paperSize);
aFormat
A reference to the format object whose dimensions you wish to obtain.
pageSize
On return, the imageable area--the area inside the margins where shapes may be drawn.
paperSize
On return, the physical dimensions of the paper.
DESCRIPTION
The GXGetFormatDimensions function returns a page size and paper size associated with a format object, after scaling and orientation have been applied. This function provides your application with boundary information that is useful for setting up margins for the drawing areas in your application. It is also useful for setting up rulers in your application to display to users.

You can specify nil in either the pageSize or paperSize parameters if you are interested in only one of the values.

The page size is anchored at location (0.0, 0.0), regardless of orientation or scaling. The paper size is outset from the page size, and the coordinates for the top-left corner of the paper are negative. Because the page coordinates are zero-based, you can start drawing at (0.0, 0.0) without regard for the paper size.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
For a description of format object mapping and how it affects the dimensions property, see the chapter "Page Formatting and Dialog Box Customization" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help